﻿/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #e0eafc, #cfdef3);
    color: #333;
    line-height: 1.6;
    padding: 20px;
    transition: background 0.5s ease;
}

/* 容器样式 */
.container {
    max-width: 900px;
    margin: 40px auto;
    background-color: #fff;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
    .container:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
        transform: translateY(-5px);
    }

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 3em;
    color: #333;
    font-weight: bold;
    background: linear-gradient(to right, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #555;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 照片上传区样式 */
.upload-section {
    margin-bottom: 40px;
}

input[type="file"],
input[type="text"],
input[type="date"],
button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f5f7fa;
}

    input[type="file"]:focus,
    input[type="text"]:focus,
    input[type="date"]:focus {
        border-color: #764ba2;
        box-shadow: 0 0 5px rgba(118, 75, 162, 0.4);
    }

/* 上传按钮样式 */
button {
    background: linear-gradient(to right, #b0ccf6, #91a0df);
    color: white;
    cursor: pointer;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease, transform 0.3s ease;
}

    button:hover {
        background: linear-gradient(to right, #a4bde4, #89aee1);
        transform: scale(1.05);
    }

    button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }
button {
    width: 49%;
    display: inline-block;
}

/* 照片查询区样式 */
.search-section {
    margin-bottom: 40px;
}

label {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    color: #333;
    font-size: 1.2em;
}


/* 照片展示区样式 */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    margin-bottom: 50px;
    text-align: center;
}

    /* 照片缩略图样式 */
    .photo-gallery img {
        width: 100%;
        height: auto;
        border-radius: 15px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        .photo-gallery img:hover {
            transform: scale(1.1);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        }

    /* 照片信息样式 */
    .photo-gallery p {
        text-align: center;
        font-size: 1em;
        color: #555;
        margin-top: 12px;
        font-weight: 500;
    }

/* 表单按钮样式 */
    .photo-gallery button {
        width: 30%;
        font-size: 10px; /* 字体变小 */
        background-color: #cdecea; /* 按钮背景色 */
        color: white; /* 按钮字体颜色 */
        border: none; /* 无边框 */
        border-radius: 5px; /* 圆角 */
        cursor: pointer; /* 鼠标悬停时显示手形光标 */
        transition: background-color 0.3s; /* 背景颜色过渡效果 */
        margin: 5px;
        justify-content: center; /* 按钮在水平方向上居中 */
        display: inline-block;
        padding: 5px;
    }

    /* 鼠标悬停时的按钮样式 */
    .photo-gallery button:hover {
        background-color: #45a049; /* 悬停时的背景颜色 */
    }


/* 顺序、倒序按钮样式 */
#orderAsc,
#orderDesc {
    background: linear-gradient(to right, #9adfdb, #8dd8d4);
    color: white;
    cursor: pointer;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1em;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 10px;
    transition: background 0.3s ease, transform 0.3s ease;
}

    #orderAsc:hover,
    #orderDesc:hover {
        background: linear-gradient(to right, #96cecb, #7ac6c2);
        transform: scale(1.05);
    }

/* 媒体查询：优化小屏幕设备显示 */
@media (max-width: 600px) {
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    button {
        width: 900%;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.4em;
    }
}

/* 模态框样式 */
.lightbox {
    display: none; /* 默认不显示 */
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #e0eafcb2; 
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

/* 保存按钮样式 */
#download {
    display: block; /* 使按钮为块级元素 */
    margin: 20px auto; /* 上下20像素，左右自动居中 */
    padding: 10px 20px; /* 按钮内边距 */
    background-color: #4CAF50; /* 按钮背景颜色 */
    color: white; /* 字体颜色 */
    border: none; /* 去掉边框 */
    border-radius: 5px; /* 圆角边框 */
    cursor: pointer; /* 鼠标悬停时显示手型 */
    width: 120px; /* 按钮宽度 */
    text-align: center; /* 文字居中 */
    font-size: 16px; /* 字体大小 */
}

    /* 保存按钮悬停效果 */
    #download:hover {
        background-color: #45a049; /* 悬停时背景颜色变化 */
    }

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

    .close:hover,
    .close:focus {
        color: #bbb;
        text-decoration: none;
        cursor: pointer;
    }